<div class="flexform">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'web-customers-form',
        'enableAjaxValidation' => false
            ));
    ?>
    <div class="row">
        <?php echo $form->labelEx($model, 'site_key'); ?>
        <?php echo $form->dropDownList($model, 'site_key', array('' => '') + Subsite::model()->getDomainSelect()); ?>
        <?php echo $form->error($model, 'site_key', array('class' => 'form-msg-error-advanced')); ?>
    </div>


    <div class="row">
        <?php echo $form->labelEx($model, 'mail'); ?>
        <?php echo $form->textField($model, 'mail', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'mail', array('class' => 'form-msg-error-advanced')); ?>
    </div>


    <div class="row">
        <?php echo $form->labelEx($model, 'fast_name'); ?>
        <?php echo $form->textField($model, 'fast_name', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'fast_name', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'last_name'); ?>
        <?php echo $form->textField($model, 'last_name', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'last_name', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'password'); ?>
        <?php echo $form->passwordField($model, 'password', array('size' => 32, 'maxlength' => 32)); ?>
        <?php echo $form->error($model, 'password', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'salt'); ?>
        <?php echo $form->textField($model, 'salt', array('size' => 16, 'maxlength' => 16)); ?>
        <?php echo $form->error($model, 'salt', array('class' => 'form-msg-error-advanced')); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'country'); ?>
        <?php echo $form->textField($model, 'country', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'country', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'city'); ?>
        <?php echo $form->textField($model, 'city', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'city', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'address'); ?>
        <?php echo $form->textField($model, 'address', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'address', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'zip_code'); ?>
        <?php echo $form->textField($model, 'zip_code', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'zip_code', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'phone'); ?>
        <?php echo $form->textField($model, 'phone', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'phone', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'msn'); ?>
        <?php echo $form->textField($model, 'msn', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'msn', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'paypal_mail'); ?>
        <?php echo $form->textField($model, 'paypal_mail', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'paypal_mail', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'total_credits'); ?>
        <?php echo $form->textField($model, 'total_credits', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'total_credits', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'monetary'); ?>
        <?php echo $form->textField($model, 'monetary', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'monetary', array('class' => 'form-msg-error-advanced')); ?>
    </div>



    <div class="row">
        <?php echo $form->labelEx($model, 'member_level'); ?>
        <?php echo $form->dropDownlist($model, 'member_level', array()+$model->member_level_array); ?>
        <?php echo $form->error($model, 'member_level', array('class' => 'form-msg-error-advanced')); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'status'); ?>
        <?php echo $form->dropDownlist($model, 'status', array() +  OrderAttribute::model()->status_array); ?>
        <?php echo $form->error($model, 'status', array('class' => 'form-msg-error-advanced')); ?>
    </div>


    <div class="row">
        <?php echo $form->labelEx($model, 'member_info'); ?>
        <?php echo $form->textArea($model, 'member_info', array('rows' => 6, 'cols' => 50)); ?>
        <?php echo $form->error($model, 'member_info', array('class' => 'form-msg-error-advanced')); ?>
    </div>


    <div class="action">
        <?php echo CHtml::submitButton($model->isNewRecord ? '创建' : '保存'); ?>
    </div>
    <?php $this->endWidget(); ?>
</div><!-- form -->
<div class="clear"></div>
<script>
  $(function(){
       $('#WebCustomers_site_key').combobox();
  });
</script>